<ul class="breadcrumb">
    <li><span class="primary-font"><i class="icon-home"></i></span><a href="index.html"> 主页</a></li>
    <li>组群</li>
</ul>
<div class="smart-widget">
    <div class="smart-widget-header">
        创建组群
    </div>
    <div class="smart-widget-inner">
        <div class="smart-widget-body">
            <form class="form-horizontal" id="groupAddForm">
                <div class="form-group">
                    <label class="control-label col-lg-1">动作名称</label>
                    <div class="col-lg-2">
                        <input type="text" name="username" class="form-control input-sm"/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="control-label col-lg-1">应用</label>
                    <div class="col-lg-2">
                        <textarea rows="3" class="form-control"></textarea>
                        <!--<input type="text" class="form-control input-sm"/>-->
                    </div>
                    <div class="col-lg-2">
                        <textarea rows="3" class="form-control"></textarea>
                        <!--<input type="text" class="form-control input-sm"/>-->
                    </div>
                </div>
                <div class="form-group">
                    <label class="control-label col-lg-1"></label>
                    <div class="col-lg-2">
                        <button class="btn btn-success btn-sm" id="validateBtn" type="submit">添加</button>
                        <button class="btn btn-success btn-sm" type="submit">取消</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
<script type="text/javascript" th:inline="javascript">
    $(function () {
        $('#groupAddForm').bootstrapValidator({
            message: 'This value is not valid',
            feedbackIcons: {
                valid: 'glyphicon glyphicon-ok',
                invalid: 'glyphicon glyphicon-remove',
                validating: 'glyphicon glyphicon-refresh'
            },
            fields: {
                username: {
                    message: '用户名验证失败',
                    validators: {
                        notEmpty: {
                            message: '动作名称不能为空'
                        }
                    }
                }
            }
        });
        $('#validateBtn').click(function() {
            $('form').bootstrapValidator('validate');

        });
    });
</script>